package com.ict.controller;


import com.ict.api.result.ApiResponse;
import com.ict.api.vo.IctProductCategoryVO;
import com.ict.service.IctProductCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 商品分类表 前端控制器
 * </p>
 *
 * @author wjp
 * @since 2025-03-23
 */
@RestController
@RequestMapping("/ict-product-category")
public class IctProductCategoryController {

    @Autowired
    private IctProductCategoryService productCategoryService;

    /**
     * 获取商品分类列表
     *
     * @return
     */
    @GetMapping("/product/categories")
    public ApiResponse<List<IctProductCategoryVO>> findProductCategories() {
        List<IctProductCategoryVO> list = productCategoryService.findProductCategories();
        return ApiResponse.success(list);
    }

}

